'''
Created on 24-Nov-2012

@author: shubhadeep
'''
from bs4 import BeautifulSoup
from crawler_lib import url_validator
import urllib
from log_init import show_log

serverListPage = urllib.urlopen("http://localhost/crawler/try1.html")
htmlText = serverListPage.read()
serverListPage.close()
soup = BeautifulSoup(htmlText)
for link in soup.find_all('a'):
    url = link.get('href')
    if url_validator.is_valid_url(url) != None:
        show_log(url)